package com.pz.gulimall.product.dao;

import com.pz.gulimall.product.entity.BrandEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * 品牌
 * 
 * @author PZ
 * @email pzs@gmail.com
 * @date 2024-02-01 20:22:28
 */
@Mapper
public interface BrandDao extends BaseMapper<BrandEntity> {
    @Update("UPDATE pms_brand SET show_status=#{brand.showStatus} WHERE brand_id = #{brand.brandId}")
    Integer updateLogicField(@Param("brand")BrandEntity brand);

    @Select("SELECT * from pms_brand")
    List<BrandEntity> listAllWithoutLogicField();
	
}
